# 父类 又称为基类
# 子类 又称为派生类

class Animal:

	def eat(self):
		print("吃")


	def drink(self):
		print("喝")


	def sleep(self):
		print("睡")

	def run(self):
		print("跑")

# 继承
# 只需要在类名后面加上(Animal)
class Dog(Animal):
	def bark(self):
		print("狗叫")



# tom_cat = Animal()
# tom_cat.eat()

erdan = Dog()
erdan.run()
erdan.bark()